<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>filters</title>
		<script type="text/javascript" src="../load_lufylegend.js"></script>
	</head>
	<body>
			<div id="legend">
			</div>
			<script>
			var loader;
			LInit(50, "legend", 800, 480, main);
			function main () {
				loader = new LLoader();
				loader.addEventListener(LEvent.COMPLETE, loadBitmapdata); 
				loader.load("face.jpg", "bitmapData");
			}
			function loadBitmapdata (event) {
				var sprite1 = new LSprite();
				addChild(sprite1);
				var bitmapdata = new LBitmapData(event.target);  
				var bitmap = new LBitmap(bitmapdata);
				sprite1.addChild(bitmap);
				sprite1.filters = [new LConvolutionFilter(3,3,[1, 1, 1, 1, 1, 1, 1, 1, 1],9)];
				
				
				var sprite2 = new LSprite();
				sprite2.x = 240;
				addChild(sprite2);
				var bitmapdata = new LBitmapData(event.target);  
				var bitmap = new LBitmap(bitmapdata);
				sprite2.addChild(bitmap);
				sprite2.filters = [new LConvolutionFilter(3,3,[-5, 0, 0, 0, 0, 0, 0, 0, 5])];
			}
			</script>
	</body>
</html>